package com.biboheart.adapter.express.support;

import com.biboheart.adapter.express.operation.Calculate;

import java.math.BigDecimal;

final class RemainderCalculate implements Calculate<Long, Long, Long> {
    @Override
    public Long calc(Long left, Long right) {
        if (null == left || null == right) {
            return 0L;
        }
        return BigDecimal.valueOf(left).remainder(BigDecimal.valueOf(right)).longValue();
    }

    @Override
    public Long calc(Long num) {
        return null;
    }
}
